package test;

/*属性：半径（radius）。
        ◦ 重写calculateArea()，公式为π*r²。*/
public class Circle extends Shape {
     private double radius;
     public  Circle(){}
    public Circle(double radius){
         this.radius = radius;
    }
    public void setRadius(double radius){
         this.radius = radius;
    }
    public double getRadius(){
         return radius;
    }
    public double calculateArea(){
         double area =3.14*radius*radius;
         return area;
    }

}
